package cn.darkhorse.mesmeter.service;

import cn.darkhorse.mesmeter.dto.param.MesMeterElectricityInfoParam;
import cn.darkhorse.mesmeter.pojo.MesMeterElectricityInfo;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 用电名称表 服务类
 * </p>
 *
 * @author maoguanjun
 * @since 2023-08-29
 */
public interface MesMeterElectricityInfoService extends IService<MesMeterElectricityInfo> {

    /**
     * 获取树状结构
     *
     * @return
     */
    JSONArray getTree();

    List<MesMeterElectricityInfo> listAll(MesMeterElectricityInfoParam param);

    /**
     * 保存
     * @param info
     * @return
     */
    boolean saveElectricityInfo(MesMeterElectricityInfo info);

    /**
     * 查看
     * @param infoId
     * @return
     */
    MesMeterElectricityInfo view(Long infoId);

    /**
     * 删除
     * @param infoId
     * @return
     */
    boolean delete(Long infoId);

    /**
     * 获取电表树
     * @return
     */
    JSONArray getMeterTree();
}
